﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NHibernate.Model
{
    /// <summary>
    /// 完成分页功能基类
    /// </summary>
    [Serializable]
    public class BaseQuery
    {
        public BaseQuery()
        {
            PageSize = 20;
            Index = 1;
        }

        /// <summary>
        /// 总条数
        /// </summary>
        public int RecordCount
        {
            get;
            set;
        }

        /// <summary>
        /// 排序字段名
        /// </summary>
        public string SortName
        {
            get;
            set;
        }

        /// <summary>
        /// 排序方式
        /// </summary>
        public string SortFlag
        {
            get;
            set;
        }

        /// <summary>
        /// 每页显示条数(默认20条)
        /// </summary>
        public int PageSize
        {
            get;
            set;
        }

        /// <summary>
        /// 当前页数
        /// </summary>
        public int Index
        {
            get;
            set;
        }
    }
}
